from time import sleep

from lxml import etree
from selenium import webdriver
from selenium.webdriver.chrome.service import Service

s = Service(r"./chromedriver.exe")
driver = webdriver.Chrome(service=s)
driver.get('http://scxk.nmpa.gov.cn:81/xk/')
response_text = driver.page_source
tree = etree.HTML(response_text)
titles = tree.xpath("//*[@id='gzlist']/li/dl/@title")
print(titles)
sleep(5)
driver.quit()
